import request from "@/utils/request";

export const getStudentAPi = (params?: any) => {
  return request({
    url: "/train/student",
    method: "get",
    params,
  });
};

export const addStudentApi = (params: any) => {
  return request({
    url: "/train/addStudent",
    method: "post",
    params,
  });
};

export const trainStationApi = (params: any) => {
  return request({
    url: "/train/trainStation",
    method: "get",
    params,
  });
};

export const trainLogApi = (params: any) => {
  return request({
    url: "/train/trainLog",
    method: "get",
    params,
  });
};

export const doneTrainApi = (id: number) => {
  return request({
    url: "/train/doneTrain/" + id,
    method: "post",
  });
};

export const trainFileApi = (params: any) => {
  return request({
    url: "/train/files",
    method: "get",
    params,
  });
};

export const delFileApi = (id: number) => {
  return request({
    url: "/train/file/" + id,
    method: "delete",
  });
};

export const saveFileApi = (data: any) => {
  return request({
    url: "/train/saveFile",
    method: "post",
    data,
  });
};
